namespace NFTRedit
{
    using System;
    using System.IO;

    public class Utility
    {
        private static bool autoApply;

        public static void ReadFile(Stream stream, byte[] data)
        {
            int offset = 0;
            int length = data.Length;
            while (length > 0)
            {
                int num3 = stream.Read(data, offset, length);
                if (num3 <= 0)
                {
                    throw new EndOfStreamException(string.Format("End of stream reached with {0} bytes left to read", length));
                }
                length -= num3;
                offset += num3;
            }
        }

        public static bool AutoApply
        {
            get
            {
                return autoApply;
            }
            set
            {
                autoApply = value;
            }
        }
    }
}

